import { defineStore } from "pinia";
import { reactive } from "vue";

interface iOrder {
  addressInfo: any;
  orderInfo: any;
  orderSpecs:any;
  actionId:number|null
}

export const useOrder = defineStore(
  "Order",
  () => {
    const order = reactive<iOrder>({
      addressInfo: {}, //地址
      orderInfo: {}, //订单信息
      orderSpecs: {}, //商品规格
      actionId: null, //选中产品id
      //订单列表
      //购物车
    });

    return {
      order,
    };
  },
  {
    persist: true,
  }
);

export default useOrder;
